package com.example.goodpet.chat.fragment;

import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import com.example.goodpet.R;
import com.example.goodpet.base.BaseFragment;
import com.example.goodpet.utils.UIUtils;

public class ChatFragment1 extends BaseFragment {
    private TextView titleText;
    private ImageView cmTitleLeft;
    private TextView cmTitleRight;


    private MyEaseConversationListFragment myEaseConversationListFragment;


    /**
     * 初始化主页面Fragment的UI
     */
    @Override
    public View initView() {
        View view = UIUtils.getView(R.layout.fragment_chat);
        myEaseConversationListFragment=new MyEaseConversationListFragment();
        FragmentManager childFragmentManager = getChildFragmentManager();
        FragmentTransaction transaction = childFragmentManager.beginTransaction();
        transaction.replace(R.id.frameLayout,myEaseConversationListFragment);
        transaction.commit();

        cmTitleLeft=view.findViewById(R.id.cmTitleLeft);
        titleText=view.findViewById(R.id.cmTitleText);
        cmTitleRight=view.findViewById(R.id.cmTitleRight);
        return view;
    }

    @Override
    public void initTitle() {
        super.initTitle();
        titleText.setText("信息");
        cmTitleLeft.setVisibility(View.INVISIBLE);
        cmTitleRight.setVisibility(View.INVISIBLE);
    }

    /**
     * 初始化主页面Fragment的数据
     */
    @Override
    public void initData() {
        super.initData();
        //isLogin();
    }

}
